package com.wxy.selector;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.nio.channels.SocketChannel;
import java.nio.charset.StandardCharsets;

/**
 * @author 47868
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel channel = SocketChannel.open();
        channel.connect(new InetSocketAddress("localhost", 8888));
        channel.write(StandardCharsets.UTF_8.encode("hello\n" +
                "worldzhangsanhdffhdgdfegdgdgdd\n"));
        channel.close();
    }
}
